// 所有的api接口统一管理
import requests from "./request";

export const reqGetPeople = (params) => {
    return requests({
        url:`/sys/lottery/getLotteryPerson`,
        headers:params,
        method:"get"
    })
};

export const reqGetPeople2 = (counts,params) => {
    return requests({
        method: "get",
        url: `/sys/lottery/StartLottery?count=${counts}`,
        headers:params
    })
};

export const reqGet = (name) => {
    return requests({
        url:`/sys/lottery/participation?name=${name}`,
        method:"get"
    })
}

export const login = (email,password) => {
    return requests({
        url:`/menber/login?email=${email}&password=${password}`,
        method:"post"
    })
}

export const regist = (params) => {
    return requests({
        url:`/menber/addMenber`,
        data:params,
        method:"post"
    })
}
export const reqGetActiveId = (params) => {
    return requests({
        url:"/lottery/getLottery",
        headers:params,
        method:"get"
    })
}

export const reqgetShopList = (name,params) => {
    return requests({
        url:`/lottery/getLotteryCommodity?activityName=${name}`,
        headers:params,
        method:"get"
    })
}

export const reqGetCounts = (params,activeId) => {
    return requests({
        url:`/menber/getLotteryChance?activityId=${activeId}`,
        headers:params,
        method:"post"
    })
}

export const reqGetShop = (params,activityName) => {
    return requests({
        url:`/lottery/lottery?activityName=${activityName}`,
        headers:params,
        method:"post"
    })
}

